﻿namespace LogNet6.Sqlite;

/// <summary>
/// 
/// </summary>
public interface ISqliteLoggerProcessor 
{
    /// <summary>
    /// 获取日志
    /// </summary>
    /// <param name="pageNo">分页序号，从0开始</param>
    /// <param name="pageSize">每页日志数量</param>
    /// <returns></returns>
    Task<List<SqliteLoggerItem>> GetLogsAsync(int pageNo, int pageSize);
    /// <summary>
    /// 获取日志
    /// </summary>
    /// <param name="pageNo">分页序号，从0开始</param>
    /// <param name="pageSize">每页日志数量</param>
    /// <returns></returns>
    List<SqliteLoggerItem> GetLogs(int pageNo, int pageSize);
    void Remove(int id);
    Task RemoveAsync(int id);
    /// <summary>
    /// 删除Id<=maxId的行
    /// </summary>
    /// <param name="maxId"></param>
    void RemoveRange(int maxId);
    /// <summary>
    /// 删除Id<=maxId的行
    /// </summary>
    /// <param name="maxId"></param>
    Task RemoveRangeAsync(int maxId);

}
